package com.chief.part2;

import com.chief.BaseBuilder;

import java.util.function.Function;

public class SecKillActivityBuilder extends ActivityBuilder implements BaseBuilder<Activity> {

    public static Activity of(Function<ActivityBuilder, BaseBuilder<Activity>> fn) {
        return fn.apply(new SecKillActivityBuilder()).build();
    }

    @Override
    public Activity build() {
        return new Activity(this);
    }

    @Override
    ActivityBuilder preparePara(String s1) {
        this.s1 = "preparePara is " + s1;
        return this;
    }

    @Override
    ActivityBuilder runningPara(String s2) {
        this.s2 = "runningPara is " + s2;
        return this;
    }

    @Override
    ActivityBuilder endingPara(String s3) {
        this.s3 = "endingPara is " + s3;
        return this;
    }
}
